package org.datacoder.benchmark

/*
 * Holds overall statistics of a given type for each finder.
 * See FinderStatHolder.
 */
class StatHolder {

    double mean
    double sd
    double lowerConf
    double upperConf

    public StatHolder(List<Double> data){
        int numData = data.size()

        mean = 0
        for(datum in data){
            mean += datum
        }
        mean /= numData

        sd = 0
        for(datum in data){
            sd += Math.pow((datum - mean), 2)
        }
        sd /= numData
        sd = Math.sqrt(sd)

        double se = sd/Math.sqrt(numData)
        lowerConf = mean - (1.96*se)
        upperConf = mean + (1.96*se)
    }

}

